/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package button_tools;

import java.awt.Color;
import java.util.ArrayList;

/**
 *
 * @author tnull
 */

// TPaint settings holds the current configuration of the
// paint program. Tools selected, size slected, drawing buffer...
// everything is stored in one central location...through the TPaintSettings object.
public class TPaintSettings {

    // enumeration representing the various tools that are available
    // within the program.
    public enum TOOLS {BRUSH, RECTANGLE, TRIANGLE, CIRCLE, SELECTOR, LINE, NONE};
    
    private Color m_Color;
    private TOOLS m_Tool;
    private int m_Size;
    private boolean m_Filled;
    
    public boolean m_fileloaded;

    // various buffers used to store shapes
    // DrawBuffer is where active shapes are stored
    // SelectedBuffer stores selected shapes
    public ArrayList<TShape> m_SelectedBuffer;
    public ArrayList<TShape> m_DrawBuffer;
    
    // Entry Point for file handler
    TFileHandler fh;

    // constructor...no arguments
    public TPaintSettings() {
        
        // initialize
        m_SelectedBuffer = new ArrayList<TShape>();
        m_DrawBuffer = new ArrayList<TShape>();
        m_Tool = TOOLS.NONE;
        m_Size = 10;
        m_Filled = false;
        m_Color = Color.BLACK;
        fh = new TFileHandler(this);
    }
    
    // THEY GET AND SET THINGS
    public void setColor(Color c) {
        m_Color = c;
    }

    public Color getColor() {
        return (m_Color);
    }

    public void setSize(int size) {
        m_Size = size;
    }

    public int getSize() {
        return (m_Size);
    }

    public void setTool(TOOLS tool) {
        m_Tool = tool;
    }

    public TOOLS getTool() {
        return (m_Tool);
    }

    public void setFilled(boolean b) {
        m_Filled = b;
    }

    public boolean getFilled() {
        return (m_Filled);
    }
}
